export default function ({ isServer, req, redirect, route }) {
    // let pcOrigin = 'http://localhost:3003'
    // let mobileOrigin = 'http://localhost:3004'
    let isMobile = (ua) => {
      return !!ua.match(/AppleWebKit.*Mobile.*/)
    }
    let userAgent = req ? req.headers['user-agent'] : navigator.userAgent || ''
    console.log(route,'route')
    console.log(route.fullPath,'route.fullPath')

    return isMobile(userAgent) ? '' : redirect('/mobile' +  route.fullPath)
    // 使用redirect 重定向到外链需要加上前缀:http / https
  }